#ifndef _MAN_LOCK_H_
#define _MAN_LOCK_H_

#include "common.h"
#include "pthread.h"

/*
功能：互斥锁
方法：
	Lock：锁
	UnLock：解锁
*/
class ManLock {
public:	
	ManLock();
	~ManLock();
	void Lock(void);
	void UnLock(void);
private:
	pthread_mutex_t m_mutex;

};

/*
功能：自动解锁的互斥锁
*/
class ManAutoLock {
public:
	ManAutoLock(ManLock * plock);
	~ManAutoLock();
private:
	ManLock * m_lock;
};

#endif
